//
//  OwlSplitLeftPartViewController.m
//  Owl
//
//  Created by Tianzhou on 09-2-22.
//  Copyright 2009 Tianzhou Software Inc.. All rights reserved.
//

#import "OwlSplitLeftPartViewController.h"
#import "OwlSourceListViewProtocol.h"
#import "OwlWindowController.h"
#import "OwlSourceListViewController.h"

@implementation OwlSplitLeftPartViewController

- (id)initWithNibName:(NSString *)name bundle:(NSBundle *)bundle windowController:(OwlWindowController *)windowController
{
	if (![super initWithNibName:name bundle:bundle windowController:windowController])
		return nil;
	
	// the represented object for the view controller is the document
	// TODO: Should move it to the super class init?
	[self setRepresentedObject:[windowController document]];
	OwlSourceListViewController *sourceListViewController = [[[OwlSourceListViewController alloc] initWithNibName:@"SourceList" bundle:nil windowController:windowController] autorelease];

	[self addChild:sourceListViewController];

	return self;
}

- (void)awakeFromNib;
{
	[super awakeFromNib];
	self.view.subviews = [NSArray arrayWithObject:[[self.children objectAtIndex:0] view]];
	//[[self sourceListViewController] setSourceListObserver:self];
}


@end
